// dog.cpp
#include "animal.hpp"
#include <iostream>

class Dog : public Animal {
  std::string name_;

public:
  Dog(const char *name) : name_(name) {}
  void sound() override { std::cout << name_ << ": wow" << std::endl; }
  std::string getName() override { return name_; }
};

extern "C" {
Animal *create_animal(const char *name) { return new Dog(name); }
void destroy_animal(Animal *p) { delete p; }
}